package com.sfh.cpc.com.widget;

import android.graphics.Rect;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;

/**
 * 功能描述:
 * @date 2019/5/13
 */
public class SpaceItemLeftDecoration extends RecyclerView.ItemDecoration  {
    private int space;

    public SpaceItemLeftDecoration(int space) {
        this.space = space;
    }

    @Override
    public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
        //不是第一个的格子都设一个左边和底部的间距
        outRect.left = space;
    }
}
